﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CP.Entities;
using CP.Repositories.GPM;
using CP.Utility;

namespace CP.Controllers.GPM
{
    public class ResourceAuthController
    {
        public int ResourceAuth(int menuid,int webpartid, int resourceid, IList<int> groups)
        {
            ResourceAuthRepository rep = new ResourceAuthRepository();
            return rep.ResourceAuth(menuid,webpartid, resourceid, groups);
        }

        public int ResourceUnAuth(int menuid,int webpartid, int resourceid, IList<int> groups)
        {
            ResourceAuthRepository rep = new ResourceAuthRepository();
            return rep.ResourceUnAuth(menuid,webpartid, resourceid, groups);
        }

        public int MenuRightCopy(int menufrom, int menuto)
        {
            ResourceAuthRepository rep = new ResourceAuthRepository();
            return rep.MenuRightCopy(menufrom, menuto);
        }
    }
}
